Skip to main content

Voice CDR

Document Version: 2
Last Updated: 25-01-2026
Maintained By: Niha


Table of Contents

  1. Overview
  2. Table Schema
  3. Field Reference
  4. Business Logic
  5. Data Quality
  6. Appendix

Overview

Summary

This document provides detailed documentation for the Voice CDR table, which records all voice events with corresponding usage, charging, and network information for billing purposes.

The Voice CDR table captures detailed records of voice calls. Usage is recorded as being either from Free Units (related to offerings) or as Charged PAYG usage. Free Units can either be joined with the PE_FREE_UNIT table (for the specific offering it came from) or the PE_FREE_UNIT_TYPE table (for bucket types).

Tables discussed

Table NameDescriptionImportant Columns
Voice CDRMain CDR table for VoiceCDR_ID, SUBSCRIBER_KEY
PE_FREE_UNITFree unit instances linked to offeringsFREE_UNIT_ID, OFFERING_ID
PE_FREE_UNIT_TYPEFree unit bucket typesFU_TYPE_ID, FU_TYPE_NAME
OfferingsOffering metadataOFFERING_ID

Table Schema


Field Reference

1. CDR Identifiers

Fields that uniquely identify CDR records and sessions.

CDR_ID

  • Description: Unique identifier for each CDR record, auto-generated by the CBS system
  • Business Logic: Combined with CDR_SUB_ID to form the complete primary key
  • Example: 123456789012345

CDR_SUB_ID

  • Description: Sub-record identifier for split CDRs
  • Business Logic: Value starts at 0 for first record, increments for each split
  • Example: 0, 1, 2
  • Notes: Most [service type] CDRs have CDR_SUB_ID = 0 unless splitting occurs

SESSION_ID

  • Description: Session identifier linking related CDRs
  • Business Logic:
    • For Hybrid subscribers: Multiple CDRs share same SESSION_ID
    • For split sessions: All parts share same SESSION_ID
    • Can be used to aggregate CDRs representing a single business event

CUST_LOCAL_START_DATE

  • Description: [Service] start time in local timezone
  • Business Logic: Used for billing cycle assignment and time-based analysis
  • Example: 2026-01-25 14:30:45
  • Timezone: Local time (Maldives: UTC+5)

CUST_LOCAL_END_DATE

  • Description: [Service] end time in local timezone
  • Business Logic: May be NULL for ongoing sessions or failed connections
  • Example: 2026-01-25 14:35:22

2. Subscriber Information

Fields identifying the subscriber and account hierarchy.

PRI_IDENTITY

  • Description: Primary identity - MSISDN (mobile number)
  • Format: International format without + symbol
  • Example: 9607123456
  • Business Logic: The charged party's phone number

SUBSCRIBER_KEY

  • Description: Service ID from CRM system
  • Business Logic: Unique identifier for the service instance, links to CRM
  • Example: 5001234567
  • Joins: Link to subscriber dimension tables

ACCOUNT_KEY

  • Description: Payment account ID from CRM
  • Business Logic: Multiple subscribers can share same account (family plans)
  • Example: 3001234567
  • Joins: Link to account dimension tables

UserState

  • Description: Service status at time of CDR generation
  • Valid Values:
    • 0 - Active
    • 1 - Suspended
    • 2 - Terminated
    • [Add other values as applicable]
  • Example: 0

GroupCallType

  • Description: Corporate User Group (CUG) call classification
  • Valid Values:
ValueDescriptionBusiness Meaning
0Non-corporate callStandard retail subscriber
1Corporate intra-network callWithin same CUG, on-net
2Corporate inter-network callCUG member calling outside CUG
4Corporate off-net number group callCUG member calling off-net designated numbers
12Corporate off-net number group call[Clarify difference from 4]
  • Default: 0
  • Business Logic: Use to identify and segment corporate vs retail traffic
  • Example: 1

OBJ_TYPE

  • Description: Object type being charged
  • Valid Values:
    • S - Subscriber (individual service)
    • A - Account (account-level charging)
    • G - Subscriber Group (for Connect offering)
  • Business Logic: Determines what entity the charge applies to
  • Example: S

OBJ_ID

  • Description: Object identifier corresponding to OBJ_TYPE
  • Business Logic:
    • When OBJ_TYPE = 'S': OBJ_ID = SUBSCRIBER_KEY
    • When OBJ_TYPE = 'A': OBJ_ID = ACCOUNT_KEY
    • When OBJ_TYPE = 'G': OBJ_ID = Subscriber Group ID
  • Example: 5001234567

CallingPartyNumber

  • Description: [Calling/Originating] party number
  • Format Options:
    • Fixed-line: Country code + Area code + PSTN number
    • Mobile: Country code + MSISDN
    • URI: Format as reported by network
  • Example: 9607123456 (mobile), 9603301234 (fixed-line)
  • Business Logic: May be empty for MT (Mobile Terminated) scenarios where calling number isn't differentiated

CalledPartyNumber

  • Description: Called/destination party number
  • Format Options: [Same as CallingPartyNumber]
  • Example: 9607654321
  • Notes: Does not record voicemail infix numbers

3. Usage Metrics

Fields capturing usage volumes and measurements.

ACTUAL_USAGE

  • Description: Actual usage volume consumed
  • Unit: Determined by USAGE_MEASURE_ID and SERVICE_UNIT_TYPE
  • Business Logic: Raw usage before any rounding or adjustments
  • Example: 305 (seconds), 1048576 (bytes)

RATE_USAGE

  • Description: Usage volume used for rating/charging. This field is used together with the ACTUAL_USAGE field. Assume that a subscriber makes a call that lasts 61s. If a charging pulse is 10s, the subscriber's actual service usage is 61s and the rated service usage is 70s.
  • Unit: Same as ACTUAL_USAGE
  • Business Logic:
    • May differ from ACTUAL_USAGE due to rounding rules
    • Formula: RATE_USAGE >= ACTUAL_USAGE (after rounding up)
    • Used in charge calculation
  • Example: 360 (rounded to nearest minute from 305 seconds)

FREE_UNIT_AMOUNT_OF_DURATION

  • Description: Total free unit usage consumed (aggregated across all free unit instances)
  • Business Logic: Sum of CHG_AMOUNT across all 10 free unit ID groups
  • Usage Classification: This is "Consumed" usage from plan/add-on allowances
  • Example: 300 (seconds)

4. Charging Information

Fields related to billing and charges applied.

DEBIT_AMOUNT

  • Description: Total amount deducted from all account sources
  • Currency: MVR (Maldivian Rufiyaa)
  • Business Logic:
    • Formula: DEBIT_AMOUNT = DEBIT_FROM_PREPAID + DEBIT_FROM_POSTPAID
    • For Hybrid subscribers with 2 CDRs: Sum both CDRs for total charge
    • Represents PAYG (Pay As You Go) charges only
  • Example: 5.00
  • Revenue Calculation: This is the charged revenue field

DEBIT_FROM_PREPAID

  • Description: Amount deducted from prepaid sources (main funds + bonuses)
  • Currency: MVR
  • Business Logic: Includes all prepaid account deductions
  • Example: 5.00

DEBIT_FROM_POSTPAID

  • Description: Amount deducted from postpaid sources (credits, bonuses, deposits, prepayments)
  • Currency: MVR
  • Business Logic: Includes all postpaid account deductions
  • Example: 0.00
  • Hybrid Note: For Hybrid PayType, check both prepaid and postpaid amounts

5. Plan and Offerings

Fields describing the subscriber's service plan and add-ons.

MainOfferingID

  • Description: Primary offering ID (base plan)
  • Business Logic: The subscriber's main plan at time of CDR
  • Example: 100001
  • Joins: Link to offering dimension for plan details

LastEffectOffering

  • Description: Last effective offering ID applied
  • Business Logic:
    • The offering that provided the free units consumed
    • Can be main plan, add-on, bonus, or special offer (e.g., FNF)
    • Used to identify special offers like Friends & Family
  • Example: 100025
  • Voice CDR Note: Use to identify and filter FNF calls

PayType

  • Description: Payment type of subscriber
  • Valid Values:
ValueTypeCharging Behavior
0PrepaidDeducted from prepaid balance
1PostpaidAdded to postpaid invoice
2HybridGenerates 2 CDRs (prepaid + postpaid portions)
  • Business Logic:
    • Hybrid subscribers generate separate CDRs for prepaid and postpaid portions
    • Link Hybrid CDRs using SESSION_ID
  • Example: 0

OpposeMainOfferingID (SMS/Voice specific)

  • Description: Primary offering ID of the peer party (called/calling party)
  • Business Logic: Useful for on-net/off-net identification
  • Example: 100002

6. Network Details

Fields describing network and location information.

SERVICE_CATEGORY

  • Description: Type of service/event
  • Valid Values:
    • VOICE - Voice call
    • DATA - Data session
    • SMS - SMS message
    • [Other categories]
  • Example: DATA

USAGE_SERVICE_TYPE

  • Description: Detailed service classification
  • Valid Values (examples):
    • Voice: Local intra-network, local inter-network, international, etc.
    • Data: Local data service
    • SMS: Local, intra-province, inter-province, international
  • Example: Local intra-network

ServiceFlow (Voice specific)

  • Description: Call process/direction
  • Valid Values:
ValueTypeDescription
1MOMobile Originated (outgoing)
2MTMobile Terminated (incoming)
3MFMobile Forwarded
  • Example: 1

CallingNetworkType

  • Description: Access network type of calling party
  • Valid Values: GSM, CDMA, EUTRAN, PSTN, etc.
  • Example: EUTRAN (4G/LTE)

CalledNetworkType

  • Description: Access network type of called party
  • Valid Values: GSM, CDMA, EUTRAN, PSTN, etc.
  • Example: EUTRAN (4G/LTE)

CallingCellID

  • Description: Cell tower identifier
  • Business Logic: Location-based analysis and network coverage optimization
  • Example: CELL-MLE-001

CalledCellID

  • Description: Cell tower identifier
  • Business Logic: Location-based analysis and network coverage optimization
  • Example: CELL-MLE-001

CallingHomeCountryCode

  • Description: Home country code
  • Example: 960 (Maldives)

CalledHomeCountryCode

  • Description: Home country code
  • Example: 960 (Maldives)

CallingHomeAreaNumber

  • Description: Home area/region number
  • Example: 03 (for Addu City)

RoamState

  • Description: Roaming state of charged party
  • Valid Values:
    • 0 - Home network
    • 1 - National roaming
    • 2 - International roaming
    • [Other values]
  • Example: 0

7. Free Unit Details (Per Offering)

Fields capturing free unit consumption broken down by offering. The CDR contains 10 sets of these fields (suffixed _1 through _10).

FREE_UNIT_ID_[1-10]

  • Description: Unique ID of free unit instance
  • Business Logic:
    • Links to PE_FREE_UNIT table for offering details
    • Up to 10 different free unit instances can be consumed in one CDR
    • NULL if no free unit consumed in this slot
  • Join: JOIN PE_FREE_UNIT ON FREE_UNIT_ID_1 = PE_FREE_UNIT.FREE_UNIT_ID
  • Example: 5000123456

CHG_AMOUNT_[1-10]

  • Description: Free unit usage amount for this instance
  • Unit: Determined by FU_MEASURE_ID_[1-10]
  • Business Logic: The actual usage consumed from this free unit instance
  • Example: 150 (seconds, bytes, items depending on measure)

FU_MEASURE_ID_[1-10]

  • Description: Free unit measurement ID
  • Valid Values: Same as USAGE_MEASURE_ID table above
  • Business Logic: Defines the unit of CHG_AMOUNT
  • Example: 1003 (seconds)

Business Logic

Usage Classification

1. PAYG Usage

  • Definition: Usage beyond free unit allowances, charged per unit
  • Calculation: RATE_USAGE - FREE_UNIT_AMOUNT_OF_DURATION

2. Baseplan Usage

  • Definition: Usage covered by free units from base plan
  • Identification: Join with PE_FREE_UNIT_TYPE to get bucket type
  • Calculation: Sum CHG_AMOUNT per baseplan bucket

3. Addon Usage

  • Definition: Usage covered by free units from add-ons
  • Identification: Join with PE_FREE_UNIT_TYPE to get bucket type
  • Calculation: Sum CHG_AMOUNT per add-on bucket

Bucket vs Offering Classification

  • Bucket: Join with PE_FREE_UNIT_TYPE for free unit bucket types
  • Offering: Join with PE_FREE_UNIT for specific offering instances
  • Both classifications can coexist for comprehensive analysis

Charge Calculation

1. PAYG charge

  • Definition: Charged incurred within the call
  • Calculation: Sum of debit amount

Special Scenarios

Hybrid Subscriber Handling

  • Scenario: Hybrid (PayType=2) subscribers generate 2 CDRs
  • Identification: Same SESSION_ID, different CDR_IDs
  • Charge Splitting: One CDR has DEBIT_FROM_PREPAID, other has DEBIT_FROM_POSTPAID
  • Total Charge: Sum both DEBIT_AMOUNT values

CUG Call Flag

  • Field: GroupCallType
  • Logic: GroupCallType != 0 for corporate calls
  • Use Case: Add CUG flag & if OBJ_TYPE != 'S', the charge should not be accounted to the customer

FNF Call Flag

  • Field: LastEffectOffering
  • Logic: When LastEffectOffering corresponds to FNF offering ID
  • Use Case: Add FNF flag
  • Note: Get FNF addon IDs from offering dimension table and join

Data Quality

Validation Rules

Mandatory Field Checks

  • CDR_ID, CDR_SUB_ID, SESSION_ID, PRI_IDENTITY, SUBSCRIBER_KEY, ACCOUNT_KEY, ACTUAL_USAGE, RATE_USAGE, DEBIT_AMOUNT must not be NULL

Appendix

A. Glossary

TermFull FormDefinition
CDRCall Detail RecordTransaction record for billable events
CBSConvergent Billing SystemHuawei billing platform
CRMCustomer Relationship ManagementCustomer/subscriber management system
MSISDNMobile Station International Subscriber Directory NumberPhone number in international format
PAYGPay As You GoUsage-based charging beyond plan allowance
CUGCorporate User GroupClosed user group for enterprise customers
FNFFriends & FamilySpecial rate plan for designated numbers
MOMobile OriginatedOutgoing call/session
MTMobile TerminatedIncoming call/session
PSTNPublic Switched Telephone NetworkTraditional landline network
RATRadio Access TechnologyWireless network type (3G, 4G, 5G)
EUTRANEvolved UMTS Terrestrial Radio Access Network4G LTE and 5G network
MVRMaldivian RufiyaaLocal currency
Table NamePurposeJoin Condition
PE_FREE_UNITFree unit instances and offering mappingsFREE_UNIT_ID_[1-10] = FREE_UNIT_ID
PE_FREE_UNIT_TYPEFree unit bucket typesVia PE_FREE_UNIT
[SUBSCRIBER]Subscriber attributesSUBSCRIBER_KEY
[ACCOUNT]Account attributesACCOUNT_KEY
[OFFERING]Offering/plan detailsMainOfferingID, LastEffectOffering

D. Change Log

VersionDateAuthorChanges
1.02026-01-25NihaInitial documentation

Document End